package gp;

import java.util.HashMap;

public class Alphabet {
	HashMap<String, Symbol> symbols;
	
	public Alphabet(){
		this.symbols = new HashMap<String, Symbol>();
		//the first symbol is the empty one
		this.symbols.put("EMPTY", new Symbol());
	}
	
	public void insert_symbol(String symbol, int degree){
		int value = this.symbols.size();
		this.symbols.put(symbol, new Symbol(symbol, value, degree));
	}
	
	public Symbol get_symbol(String symbol){
		return this.symbols.get(symbol);
	}
	
	public int size(){
		return this.symbols.size();
	}
}
